/**
 * 边界上的蚂蚁
 *
 * @USER: Administrator
 * @DATE: 2024/9/22 上午11:53
 * @VERSION: 1.0.0
 */
public class LC3028 {
    public static void main(String[] args) {

    }

    public int returnToBoundaryCount(int[] nums) {
        int sum = 0,count = 0;
        for (int num : nums) {
            sum += num;
            if (sum == 0) {
                count++;
            }
        }
        return count;
    }

}
